//
//  SYNewsCell.m
//  MicroNews
//
//  Created by tongcheng on 15/10/20.
//  Copyright © 2015年 siyue. All rights reserved.
//

#import "NewsCell.h"
#import "NewsModel.h"
//#import "SYShowNewsController.h"

@interface NewsCell()
@property (weak, nonatomic) IBOutlet UILabel *title;//标题

@property (weak, nonatomic) IBOutlet UIImageView *image;//图片


@property (weak, nonatomic) IBOutlet UILabel *timedesc; //时间
@property (weak, nonatomic)  UIButton *commont; //评论
@property (weak, nonatomic) IBOutlet UIButton *buttonP;
@property (weak, nonatomic) IBOutlet UIView *lineView;

@end

@implementation NewsCell



- (void)awakeFromNib {
    
    
    
//    self.lineView.height = 1/[UIScreen mainScreen].scale;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setNews:(NewsModel *)news
{
    _news = news;
    
    self.title.text = news.title;
    self.source.text = news.source;
    self.timedesc.text = news.timedesc;
    [self.buttonP setTitle:news.commont forState:UIControlStateNormal];
}

+ (instancetype)cellWithTable:(UITableView *)tableView{
    
    static NSString *ID = @"NewsCell";
    NewsCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    
    return cell;
}

@end
